Electronic device and method of automatically switching to panorama capture mode

ABSTRACT

An electronic device and method are disclosed herein. The electronic device includes a display, a camera, a sensor circuit, a processor. The processor implements the method, including executing a preview mode and outputting a camera preview image, detecting movement of the device, detecting whether a movement distance reaches a reference distance, when the movement distance reaches the reference distance, detecting whether the movement direction matches a reference direction, and when the movement direction matches the reference direction, switching to a panorama capture mode.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is based on and claims priority under 35 U.S.C. § 119to Korean Patent Application No. 10-2018-0057657, filed on May 21, 2018,in the Korean Intellectual Property Office, the disclosure of which isincorporated by reference herein its entirety.

BACKGROUND 1. Technical Field

Embodiments of the disclosure relate to controlling cameras withinelectronic devices, and more particularly, to automatically switching.

2. Description of Related Art

Modern electronic devices, such as smartphones, tablet PCs, or the likeare often equipped with a camera. Using a camera, the electronic devicemay capture images of objects situated within a field-of-view of thecamera lens. For example, an angle of a camera's field-of-view may be arange (e.g., 30 to 50 degrees) narrower than the visible view range of ahuman being.

The electronic device may support a panorama capture mode. In thepanorama capture mode, a plurality of images are photographed while theelectronic device is moving (e.g., panning) and the photographed imagesare sequentially connected to reconstruct a single panoramic image.Accordingly, in the panorama capture mode, the electronic device maystore several images in a memory and process the stored images to formone single panoramic image.

The above information is presented as background information only toassist with an understanding of the disclosure. No determination hasbeen made, and no assertion is made, as to whether any of the abovemight be applicable as prior art with regard to the disclosure.

SUMMARY

An electronic device according to the related art has a complicated userinterface for entering a panorama capture mode, so that the use thereofis infrequent.

Aspects of the disclosure are to address at least the above-mentionedproblems and/or disadvantages and to provide at least the advantagesdescribed later below.

In accordance with an aspect of the disclosure, an electronic device isdisclosed, including a display, a camera arranged on one surface of theelectronic device, a sensor circuit configured to sense movement of theelectronic device, a processor functionally coupled to the camera andthe sensor circuit, and a memory electrically coupled to the processor,wherein the memory stores instructions that, when executed, cause theprocessor to: execute a preview mode including outputting an imageobtained using the camera to the display, obtain movement informationusing the sensor circuit while executing the preview mode, determinewhether a movement distance of the electronic device is equal to orgreater than a prespecified reference distance, based on the movementinformation, when the movement distance is equal to or greater than theprespecified reference distance, determine whether a moving direction ofthe electronic device matches a prespecified reference direction, basedon the movement information; and when the moving direction of theelectronic device matches the prespecified reference direction, switchto a panorama capture mode.

In accordance with another aspect of the disclosure, a method of anelectronic device is disclosed, including when detecting a movement ofthe electronic device, obtaining movement information using a sensorcircuit while executing a preview mode, the preview mode includingoutputting an image obtained using a camera to a display, tracking amovement distance of the electronic device based on the movementinformation, when the movement distance of the electronic device isequal to or greater than a prespecified reference distance, determiningwhether a moving direction of the electronic device matches aprespecified reference direction during the movement based on themovement information, and when the moving direction of the electronicdevice matches the prespecified reference direction, switching to apanorama capture mode.

Other aspects, advantages, and salient features of the disclosure willbecome apparent to those skilled in the art from the following detaileddescription, which, taken in conjunction with the annexed drawings,discloses certain embodiments of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of certainembodiments of the disclosure will be more apparent from the followingdescription taken in conjunction with the accompanying drawings, inwhich:

FIG. 1 is a view illustrating an automatic panorama capture mode of anelectronic device according to an example embodiment;

FIG. 2 is a block diagram of an electronic device according to anexample embodiment;

FIG. 3A, FIG. 3B, FIG. 3C and FIG. 3D are views illustrating examples ofreference directions when the lateral direction of an electronic deviceaccording to an example embodiment is vertically positioned;

FIG. 3E, FIG. 3F, FIG. 3G and FIG. 3H are views illustrating examples ofthe reference directions when the lateral direction of an electronicdevice according to an example embodiment is horizontally positioned;

FIG. 4A is a view illustrating an angle change in the yz-axis directionof an electronic device according to an example embodiment;

FIG. 4B is a view illustrating an angle change in the xy-axis directionof an electronic device according to an example embodiment;

FIG. 4C is a view illustrating an angle change in the zx-axis directionof an electronic device according to an example embodiment;

FIG. 5A is a view illustrating an example of a UI screen in a process ofswitching from a preview mode to a panorama capture mode according to anexample embodiment;

FIG. 5B is a view illustrating an example of a UI screen in a case ofrefusing to switch to a panorama capture mode according to an exampleembodiment;

FIG. 6A is a view illustrating another example of a UI screen in aprocess of switching from a preview mode to a panorama capture modeaccording to an example embodiment;

FIG. 6B is a view illustrating another example of the UI screen in acase of refusing to switch to a panorama capture mode according to anexample embodiment

FIG. 7A is a view illustrating a UI screen in a panorama capture modeaccording to an example embodiment;

FIG. 7B is a view illustrating a UI screen in a process of selecting animage to be included in a panoramic image according to an exampleembodiment;

FIG. 7C is a view illustrating a UI screen when a panorama capture modeis terminated according to an example embodiment;

FIG. 8 is a flowchart illustrating a photographing method according toan example embodiment; and

FIG. 9 is a block diagram of an electronic device in a networkenvironment system according to certain example embodiments.

In regard to the description of the drawings, the same or correspondingelements may be given the same reference numerals.

DETAILED DESCRIPTION

Hereinafter, certain embodiments of the disclosure will be describedwith reference to accompanying drawings. However, those of ordinaryskill in the art will recognize that modification, equivalent, and/oralternative on certain embodiments described herein can be variouslymade without departing from the disclosure.

The electronic device according to certain embodiments may be one ofvarious types of electronic devices. The electronic devices may include,for example, a portable communication device (e.g., a smart phone), acomputer device, a portable multimedia device, a portable medicaldevice, a camera, a wearable device, or a home appliance. According toan embodiment of the disclosure, the electronic devices are not limitedto those described above.

It should be appreciated that certain embodiments of the presentdisclosure and the terms used therein are not intended to limit thetechnological features set forth herein to particular embodiments andinclude various changes, equivalents, or replacements for acorresponding embodiment. With regard to the description of thedrawings, similar reference numerals may be used to refer to similar orrelated elements. It is to be understood that a singular form of a nouncorresponding to an item may include one or more of the things, unlessthe relevant context clearly indicates otherwise. As used herein, eachof such phrases as “A or B,” “at least one of A and B,” “at least one ofA or B,” “A, B, or C,” “at least one of A, B, and C,” and “at least oneof A, B, or C,” may include all possible combinations of the itemsenumerated together in a corresponding one of the phrases. As usedherein, such terms as “1st” and “2nd,” or “first” and “second” may beused to simply distinguish a corresponding component from another, anddoes not limit the components in other aspect (e.g., importance ororder). It is to be understood that if an element (e.g., a firstelement) is referred to, with or without the term “operatively” or“communicatively”, as “coupled with,” “coupled to,” “connected with,” or“connected to” another element (e.g., a second element), it means thatthe element may be coupled with the other element directly (e.g.,wiredly), wirelessly, or via a third element.

Hereinafter, electronic devices according to an embodiment of thepresent disclosure will be described with reference to the accompanyingdrawings. The term “user” used herein may refer to a person who uses anelectronic device or may refer to a device (for example, an artificialelectronic device) that uses an electronic device.

FIG. 1 is a view illustrating an automatic panorama capture mode of anelectronic device according to an embodiment. An aspect of thedisclosure is to provide an electronic device capable of automaticallyswitching from a preview mode to a panorama capture mode based on themovement of the electronic device, and a method of automaticallyswitching to a panorama capture mode.

Referring to FIG. 1, an electronic device 100 may include a camera 110and a sensor circuit (or a sensor device) 120.

According to an embodiment, the camera 110 may be arranged on onesurface (e.g., a front or rear surface) of the electronic device 100.According to an embodiment, the one surface of the electronic device 100may include a display. According to another embodiment, the one surfacemay lack a display.

The camera 110 may be configured to capture a still or moving image. Thecamera 110 may include one or more lens assemblies, an image sensor, animage signal processor, or a lens driving unit. The lens assembly mayhave a specified angle of view and a specified focal length. Dependingon an attribute of the lens assembly, the image obtained from the camera110 may be an image that is focused within the field of view (FOV). Theimage sensor may convert the light transmitted from an external objectthrough the lens assembly into an electrical signal to obtain image datacorresponding to the external object (e.g., a subject). The image sensormay be implemented as a charged coupled device (CCD) sensor or acomplementary metal oxide semiconductor (CMOS) sensor. The lens drivingunit may adjust the position of the lens assembly in response to aninstruction of a processor (e.g., an image signal processor).

According to an embodiment, the sensor circuit 120 may sense a movementof the electronic device 100 and output movement informationcorresponding to the sensed movement. For example, the sensor circuit120 may include at least one of a gyro sensor, a geomagnetic sensor, oran acceleration sensor.

According to an embodiment, the electronic device 100 (e.g., aprocessor) may obtain movement information by using the sensor circuit120 in a preview mode and may determine, based on the movementinformation, whether a movement distance ‘d’ of the electronic device100 is greater than or equal to a specified reference distance (e.g., 5cm). For example, the electronic device 100 may detect a distance bywhich the electronic device 100 is moved for a prespecified time (e.g.,the time period from t0 to t1, e.g., 1 second) based on the movementinformation, and may determine whether the identified movement distanceis greater than or equal to the specified reference distance.

When the movement distance of the electronic device 100 is equal to orgreater than the specified reference distance, the electronic device 100may determine whether a moving direction of the electronic device 100 isa prespecified reference direction. When the moving direction is thereference direction, the electronic device 100 may switch to a panoramacapture mode.

According to certain embodiments, the reference direction may be, forexample, an upward direction (a direction in which an upper side surfaceof the electronic device 100 faces (e.g., +y direction)), a downwarddirection (the direction in which a lower side surface of the electronicdevice 100 faces (e.g., −y direction)), a right direction (the directionin which a right side surface of the electronic device 100 faces (e.g.,+x direction)), and a left direction (the direction in which a left sidesurface of the electronic device 100 faces (e.g., −x direction)) of theelectronic device 100 at the time point t1 when the electronic device100 moves by the specified reference distance.

The electronic device 100 may further identify at least one variable ofan angle change of the electronic device 100, a moving velocity or aposition change (e.g., changes in +y and −y directions) in a pluralityof second directions perpendicular to a reference direction based on themovement information while moving by the specified reference distance,and may switch from the preview mode to the panorama capture modefurther based on the at least one variable.

For example, when the movement distance of the electronic device 100 isequal to or greater than the specified reference distance and the movingdirection of the electronic device 100 is the reference direction, theelectronic device 100 may switch to the panorama capture mode.

As another example, the electronic device 100 may identify an anglechange of the electronic device 100 while moving by a specifiedreference distance, and when the movement distance of the electronicdevice 100 is equal to or greater than the specified reference distance,the moving direction of the electronic device 100 is the referencedirection, and the angle change is within a specified reference range,the electronic device 100 may switch to the panorama capture mode. Forexample, the electronic device 100 may use at least one of a gyro sensoror a geomagnetic sensor to identify the change in angle of theelectronic device 100.

For another example, when the movement distance of the electronic device100 is equal to or greater than the specified reference distance and themoving direction of the electronic device 100 is the referencedirection, the position change of the electronic device 100 in theplurality of second directions may be identified during the movement bythe specified reference distance. The electronic device 100 may switchfrom the preview mode to the panorama capture mode when the identifiedposition change in the second direction is within a specified referencedistance range. For example, the specified reference distance range mayinclude distance ranges of half of specified reference distancesdifferent from each other in two directions perpendicular to thereference direction based on the position of the electronic device 100at the time point t1 (or the time point t0).

The electronic device 100 may generate a panoramic image in the panoramacapture mode based on the plurality of images obtained by using thecamera 110. For example, the plurality of images may include firstimages obtained in the preview mode and second images obtained in thepanorama capture mode. For example, the electronic device 100 may alignthe first and second images to allow the boundary portions between thefirst images and the boundary portions between the second images tooverlap each other in a specified size, and may combine the first andsecond images through image processing such as stitching and blending,thereby generating a panoramic image.

According to the above-described embodiment, the electronic device 100may switch automatically or through a user confirmation from the previewmode to the panorama capture mode corresponding to the movement of theelectronic device without user's operation for entering the panoramacapture mode. Thus, the convenience of entering the panorama capturemode may be improved.

FIG. 2 is a view illustrating a configuration of an electronic deviceaccording to an embodiment.

Referring to FIG. 2, the electronic device 100 (e.g., the electronicdevice 100 of FIG. 1) may include the camera 110 (e.g., the camera 110of FIG. 1), the sensor circuit 120 (e.g., the sensor circuit 120 of FIG.1), a display 130, a memory 140, and a processor 150. In an embodiment,some components may be omitted, or an additional component may befurther included. In an embodiment, some of the components may becoupled to form a single entity, but the functions of the correspondingcomponents before being coupled may be performed in the same manner.

According to an embodiment, the camera 110 may obtain (e.g., capture,photograph, etc.) a still or moving image in response to an instructionof the processor 150. For example, a camera 110 provided on a firstsurface (e.g., a rear surface) of the electronic device 100 may be usedto capture an image.

According to an embodiment, the sensor circuit 120 may obtain movementinformation of the electronic device 100, corresponding to presetsetting information or an instruction of the processor 150. For example,the movement information may include at least one of angular velocityinformation (or rotation information), geomagnetism information (ordirection information), or acceleration information (or movementdistance information) of the electronic device 100.

According to an embodiment, the display 130 may display for example,various visual content (e.g., text, an image, a video, an icon, asymbol, or the like). For example, the display 130 may include a liquidcrystal display (LCD), a light emitting diode (LED) display, an organiclight emitting diode (OLED) display, or an electronic paper display. Thedisplay 130 may output an image obtained from the camera 110corresponding to an instruction of processor 150 or a setting. Thedisplay 130 may be provided on a second surface (e.g., a front surface)of the electronic device 100. For example, the display 130 may be atouch screen display including an input device. According to certainembodiments, in the electronic device 100 of the disclosure, the inputdevice may be provided separately from the display 130.

For example, the memory 140 may store a command or data related to atleast another component of the electronic device 100. The memory 140 maybe a volatile memory (e.g., RAM, or the like), a non-volatile memory(e.g., a ROM, a flash memory, or the like), or the combination thereof.The memory 140 may store instructions that are set to allow theprocessor 150 to identify at least one of a movement distance of theelectronic device 100, a moving direction of the electronic device 100,or an angle change of the electronic device 100 based on the movementinformation. The memory 140 may store instructions that are set to allowthe processor 150 to identify the moving speed of the electronic device100 based on the movement information. The memory 140 may storeinstructions set to switch from the preview mode to the panorama capturemode (e.g., a mode for panoramic photographing) in association with thefunction of the camera 110 when the movement of the electronic devicemeets a specified condition for a specified time or at a specific timepoint. The memory 140 may store instructions set to generate a panoramicimage based on the plurality of images obtained by using the camera 110in the panorama capture mode.

The processor 150 may execute operations or data processing related tocontrol and/or communication of at least one other component of theelectronic device 100 by using the instructions stored in the memory140. For example, the processor 150 may include at least one of acentral processing unit (CPU), a graphics processing unit (GPU), amicroprocessor, an application processor, an application specificintegrated circuit (ASIC), and field programmable gate arrays (FPGA),and may have a plurality of cores.

According to an embodiment, the processor 150 may output, to the display130, an image (preview image) obtained by using the camera 110 in thepreview mode. The processor 150 may obtain the movement information byusing the sensor circuit 120 in the preview mode and may identify themovement of the electronic device 100 based on the movement information.For example, the processor 150 may use an acceleration sensor toidentify at least one of a moving direction, a movement distance, or amoving speed of the electronic device 100. As another example, theprocessor 150 may use at least one of a gyro sensor or a geomagneticsensor to identify an angle change (e.g., a change in rotation angle orrotation direction) of the electronic device 100.

The processor 150 may automatically switch to the panorama capture modewhen the motion of the electronic device 100 meets the specifiedconditions. The specified conditions may relate to at least one of, forexample, the movement distance of the electronic device 100, the movingdirection, the moving speed, the angle change of the electronic device100, or the object included in the preview image.

The processor 150 may automatically switch from the preview mode to thepanorama capture mode even when the user enters a specific menu of theuser interface and does not set the switch to the panorama capture mode.When the automatic switching function for the panorama capture mode isset, the processor 150 may automatically switch from the preview mode tothe panorama mode based on the movement information of the electronicdevice 100.

For example, the panorama capture mode may be a mode in which theelectronic device 100 processes a plurality of images photographed whileone of the angle or position of the electronic device is changed andreconstructs the images into one image.

According to an embodiment, for example, the specified condition mayinclude a condition that the movement distance of the electronic device100 is greater than or equal to the specified reference distance, andthe moving direction of the electronic device 100 is the referencedirection. The processor 150 may track the movement distance of theelectronic device 100 based on the movement information of theelectronic device 100 in the preview mode. When the traced movementdistance is greater than or equal to the specified reference distance,the processor 150 may determine whether the moving direction of theelectronic device 100 moved by the specified movement distance is thereference direction. For example, the reference direction may include atleast one of an upper side direction (e.g., a +y direction of FIG. 1), alower side direction (e.g., a +y direction of FIG. 1), a left direction(e.g., a −x direction of FIG. 1), and a right direction (e.g., an xdirection of FIG. 1) of the electronic device 100 at a time point (e.g.,t1 of FIG. 1) when the electronic device 100 moves by the specifiedreference distance. When the movement distance of the electronic device100 is equal to or greater than the specified reference distance and themoving direction of the electronic device 100 is the referencedirection, the electronic device 100 may switch from the preview mode tothe panorama mode.

According to an embodiment, for example, the specified condition mayinclude a condition that the movement distance of the electronic device100 is equal to or greater than the specified reference distance, themoving direction of the electronic device 100 is the referencedirection, and the angle change of the electronic device 100 is withinthe specified reference range. The processor 150 may track the movementdistance of the electronic device 100 based on the movement informationof the electronic device 100 in the preview mode. When the tracedmovement distance is greater than or equal to the specified referencedistance, the processor 150 may determine whether the moving directionof the electronic device 100 moved by the specified movement distance isthe reference direction. When the movement distance of the electronicdevice 100 is equal to or greater than the specified reference distanceand the moving direction of the electronic device 100 is the referencedirection, the processor 150 may identify the angle change of theelectronic device 100 while the electronic device 100 moves by thespecified reference distance based on the movement information. Forexample, the angle change of the electronic device 100 may include anangle change of the electronic device 100 as the electronic device 100is rotated about at least one of the xy axis direction, the yz axisdirection, or the zx axis direction. When the movement distance of theelectronic device 100 is equal to or greater than the specifiedreference distance, the moving direction of the electronic device 100 isthe reference direction, and the angle change of the electronic device100 is within the specified reference range, the processor 150 mayautomatically switch from the preview mode to the panorama capture mode(or switch through user confirmation).

For example, the specified reference range includes +10 degrees to −10degrees with respect to the position of the electronic device 100 at thetime point (e.g., t0 of FIG. 1) when the tracking for the specifiedreference distance starts. According to certain embodiments, thespecified reference range may be set differently for the xy axisdirection, the yz axis direction, and the xz axis direction. Accordingto certain embodiments, the processor 150 may determine whether theelectronic device 100 has been stopped for a specified time based on themovement information, and when the electronic device 100 has beenstopped for the specified time, the electronic device 100 may start totrack the movement distance thereof.

According to certain embodiments, the processor 150 may first identifythe moving direction and angle change of the electronic device 100 basedon the movement information of the electronic device 100, and then, theprocessor 150 may switch the electronic device 100 from the preview modeto the panorama capture mode as the result of identifying the movementdistance of the electronic device 100. For example, when it isidentified that the moving direction of the electronic device 100 is thereference direction, the processor 150 may determine whether the anglechange of the electronic device 100 is within the specified referencerange. When the angle change is within the specified reference range,the processor 150 may determine whether the movement distance of theelectronic device 100 is equal to or greater than the specifiedreference distance. The processor 150 may switch from the preview modeto the panorama capture mode when the movement distance of theelectronic device 100 is greater than or equal to the specifiedreference distance.

According to an embodiment, the specified condition may further includea condition of at least one of a moving speed in the reference directionor a movement distance in a second direction. For example, the processor150 may further identify the moving speed of the electronic device 100during movement by a specified reference distance based on the movementinformation. When the movement distance of the electronic device 100 isequal to or greater than the specified reference distance, the movingdirection of the electronic device 100 is the reference direction, andthe angle change of the electronic device 100 is within the specifiedreference range, the processor 150 may switch from the preview mode tothe panorama capture mode when the moving speed of the electronic device100 in the reference direction is less than a specified reference speed.As another example, the processor 150 may further identify the positionchanges in a plurality of second directions while being moved by thereference distance in the reference direction. When the movementdistance of the electronic device 100 is greater than or equal to thespecified reference distance and the angle change of the electronicdevice 100 is within the specified reference range while the movingdirection of the electronic device 100 is the reference direction, theprocessor 150 may switch the preview mode to the panorama capture modewhen the position changes in the plurality of second directions arewithin the specified reference distance range. For example, the seconddirections, which are perpendicular to the reference direction, mayinclude the +y direction and the −y direction when the referencedirection is the x-axis direction of FIG. 1.

According to an embodiment, the processor 150 may further identify anobject included in first images obtained while being moved by thespecified reference distance, and may switch to the panorama capturemode when identifying that a specified object is included in the firstimages. For example, the specified object may include an object relatedto a landscape such as horizon, sea, mountain, or the like. As anotherexample, the specified object may be an object selected from a pluralityof selectable objects provided by the processor 150 in response to auser input. In the above-described embodiment, when the movementdistance is less than the specified reference distance, the movingdirection is not the reference direction, the angle change of theelectronic device 100 during the movement by the specified referencedistance is out of the specified reference range, the moving speed ofthe electronic device 100 during the movement by the specified referencedistance is equal to or greater than the specified reference speed, orthe position change with respect to the plurality of second directionsis out of the specified reference distance range, the processor 150 maymaintain the preview mode.

According to an embodiment, the processor 150 may generate a panoramicimage in the panorama capture mode based on the plurality of imagesobtained by using the camera 110. For example, the processor 150 maygenerate a panoramic image by aligning a plurality of images such thatthe boundary portions of the plurality of images are appropriatelyoverlapped and combining the images through image processing such asstitching, blending, and the like. The plurality of images applied tothe panoramic image may include images obtained in the panorama capturemode. According to certain embodiments, the plurality of images mayinclude the first images obtained in the preview mode and the secondimages obtained in the panorama capture mode. To this end, the processor150 may store, in the memory 140, the first images including at leastsome of the preview images in the preview mode while tracking themovement distance of the electronic device 100 in the preview mode, andmay store, in the memory 140, the second images obtained in the panoramacapture mode. The processor 150 may generate a panoramic image based onthe first and second images stored in the memory 140 in the panoramacapture mode. The processor 150 may delete the first images stored inthe memory 140 in the preview mode when the movement of the electronicdevice 100 does not correspond to the specified condition and theelectronic device 100 does not switch to the panorama capture mode.

According to an embodiment, the processor 150 may generate a panoramicimage by selectively using some of the first images obtained prior toswitching to the panorama capture mode. For example, the processor 150may output, to the display 130, the screen information including anediting object that can specify some of the first images (some images tobe used for generating the panoramic image) in the panorama capturemode. For example, the editing object may include a button forselecting, from all the first images, images which are to be used togenerate the panoramic image and are obtained for a time (e.g., severalseconds) before switching to the panorama capture mode. As anotherexample, the editing object may include a menu for selecting, from theall the first images, some images which follow the second images and areused to generate the panoramic image.

According to an embodiment, the processor 150 may output screeninformation for guiding the switching to the panorama capture mode tothe display 130 before switching to the panorama capture mode or whenthe switching mode is switched to the panorama capture mode. The screeninformation may include an editing object capable of selecting whetherto switch to the panorama capture mode.

According to an embodiment, when the movement of the electronic device100 meets a specified condition, the processor 150 may output, to thedisplay 130, the screen information capable of selecting whether toswitch to the panorama capture mode. The processor 150 may switch to thepanorama capture mode or may maintain the preview mode in response tothe input of the user corresponding to the screen information. Forexample, when the processor 150 identifies the user input that selectsthe switching to the panorama capture mode (or accepting the switching)through the switching button included in the screen information, theprocessor 150 may switch from the preview mode to the panorama capturemode. As another example, when the processor 150 identifies the userinput that does not select switching to the panorama capture modethrough the screen information, the processor 150 may maintain thepreview mode without switching to the panorama capture mode. As stillanother example, when the movement of the electronic device 100 meets aspecified condition, the processor 150 may display, to the display 130,the screen information guiding that the mode automatically switches tothe panorama capture mode when the electronic device 100 is furthermoved by another specified reference distance in the referencedirection. In this case, after outputting the screen information, theprocessor 150 may determine whether the electronic device 100 is furthermoved by another specified reference distance in the reference directionbased on the movement information. When the electronic device 100 isfurther moved by another specified reference distance in the referencedirection, the processor 150 may switch from the preview mode to thepanorama capture mode.

According to the above-described embodiment, the processor 150automatically switches from the preview mode to the panorama capturemode based on the movement of the electronic device 100, or outputs thescreen information for switching to the panorama capture mode, so thatit is possible to greatly improve the convenience of use and switchingto the panorama capture mode.

According to an embodiment, an electronic device (e.g., the electronicdevice 100 of FIG. 2) may include a display (e.g., the display 130 ofFIG. 2); a camera (e.g., the camera 110 of FIG. 2) arranged on onesurface of the electronic device; a sensor circuit (e.g., the sensorcircuit 120 of FIG. 2) capable of sensing movement of the electronicdevice; a processor (e.g., the processor 150 of FIG. 2) functionallyconnected to the camera and the sensor circuit; and a memory (e.g., thememory 140 of FIG. 2) electrically connected to the processor. Thememory may store instructions which cause the processor to, in a previewmode in which images obtained by using the camera are output to thedisplay, obtain movement information by using the sensor circuit, obtaina movement distance of the electronic device based on the movementinformation, determine whether a moving direction of the electronicdevice is a specified reference direction based on the movementinformation when the movement distance of the electronic device is equalto or greater than a specified reference distance, and switch to apanorama capture mode when the moving direction of the electronic deviceis the reference direction.

The reference direction may include at least one of a left direction, aright direction, an upward direction, and a downward direction of theelectronic device moved by the specified reference distance.

The instructions may further cause the processor to identify an anglechange of the electronic device during the movement by the specifiedreference distance based on the movement information, and switch fromthe preview mode to the panorama capture mode when the moving directionof the electronic device is the reference direction and the angle changeis within a specified reference range.

The instructions may further cause the processor to identify at leastone of an angle change in an xy axis direction, an angle change in an yzaxis direction, or an angle change in a zx axis direction amongspecified xyz three-axis directions when the angle change of theelectronic device is identified during the movement by the specifiedreference distance.

The instructions may further cause the processor to identify a movingspeed of the electronic device while the electronic device is moved bythe specified reference distance, based on the movement information, andswitch to the panorama capture mode when the movement distance of theelectronic device is greater than or equal to the specified referencedistance, the moving direction of the electronic device is the referencedirection, and the moving speed of the electronic device is less than aspecified reference speed.

The instructions may further cause the processor to identify a locationchange of the electronic device with respect to a plurality of seconddirections perpendicular to the reference direction during the movementby the specified reference distance based on the movement information;and switch to the panorama capture mode when the movement distance ofthe electronic device is equal to or greater than a specified referencedistance, the moving direction of the electronic device is the referencedirection, and the location change is within the specified referencedistance range.

The instructions may further cause the processor to store, in thepreview mode, first images obtained by using the camera while trackingthe movement distance in the memory, store, in the panorama capturemode, second images obtained by using the camera in the memory, andgenerate a panoramic image based on the first and second images storedin the memory.

The instructions may further cause the processor to delete the firstimages stored in the memory when the movement distance is less than thespecified reference distance or the moving direction is different fromthe reference direction.

The instructions may further cause the processor to output screeninformation including a first menu capable of specifying some of theplurality of images to the display, and generate the panoramic imagebased on the images specified through the first menu.

The instructions may further cause the processor to further identify anobject included in the plurality of images, and switch to the panoramacapture mode when the movement distance of the electronic device isequal to or greater than the specified reference distance, the movingdirection of the electronic device is the reference direction, and aspecified object is included in the identified object.

The instructions may further cause the processor to output screeninformation for guiding the switching to the panorama capture mode whenthe movement distance of the electronic device is equal to or greaterthan the specified reference distance and the moving direction of theelectronic device is the reference direction, and switch to the panoramacapture mode when the electronic device moves further by anotherspecified reference distance in the reference direction.

The instructions may further cause the processor to output, to thedisplay, screen information including a second menu capable of selectingwhether to switch to the panorama capture mode when the movementdistance of the electronic device is equal to or greater than thespecified reference distance and the moving direction of the electronicdevice is the reference direction, and switch to the panorama capturemode in response to a user input agreeing to switch to the panoramacapture mode through the second menu.

FIGS. 3A to 3D are views illustrating examples of reference directionswhen the lateral direction of the electronic device according to anembodiment is vertically positioned. In FIGS. 3A to 3H, a time point t0is a time point when the processor 150 starts to track the movement ofthe electronic device 100, and a time point t1 is a time point when theprocessor 150 identifies that the movement distance of the electronicdevice 100 is equal to or greater than the specified reference distance,and the moving direction of the electronic device 100 is the referencedirection.

Referring to FIGS. 3A to 3D, the lateral direction of the electronicdevice 100 (e.g., reference numeral 100 of FIG. 2) may be verticallypositioned at the time point t1.

As shown in FIG. 3A, the processor 150 may identify that the electronicdevice 100 has been moved the specified reference distance, in therightwards direction (i.e., the arrow of FIG. 3A corresponding to a +xaxial direction) of the electronic device 100, at the time point t1,from among the upwards, downwards, leftwards and rightwards directionsof the electronic device 100. In this case, the processor 150 maydetermine the rightwards direction as the reference direction, anddetermine upwards direction (e.g., the +y direction) and the downwardsdirection (e.g., the −y direction) as the plurality of seconddirections.

As shown in FIG. 3B, the processor 150 may identify that the electronicdevice 100 has been moved the specified reference distance, in theleftwards direction (i.e., the arrow of FIG. 3B corresponding to the −xaxial direction) of the electronic device 100 at the time point t1, fromamong the upwards, downwards, leftwards and rightwards directions of theelectronic device 100. In this case, the processor 150 may determine theleftwards direction as the reference direction, and determine theupwards direction (e.g., the +y direction) and the downwards direction(e.g., the −y direction) as the plurality of second directions.

As shown in FIG. 3C, the processor 150 may identify that the electronicdevice 100 has been moved the specified reference distance in thedownwards direction (i.e., the arrow of FIG. 3C corresponding to a −yaxial direction) of the electronic device 100 at the time point t1, fromamong the upwards, downwards, leftwards and rightwards directions of theelectronic device 100. In this case, the processor 150 may determine thedownwards direction as the reference direction, and determine theleftwards direction (e.g., the −x axial direction) and the rightwardsdirection (e.g., the +x axial direction) as the plurality of seconddirections.

As shown in FIG. 3D, the processor 150 may identify that the electronicdevice 100 has been moved the specified reference distance in theupwards direction (i.e., the arrow of FIG. 3D corresponding to the +yaxial direction) of the electronic device 100 at the time point t1, fromamong the upwards, downwards, leftwards and rightwards directions of theelectronic device 100. In this case, the processor 150 may determine theupwards direction as the reference direction and determine the leftwardsdirection (e.g., the −x direction) and the rightwards direction (e.g.,the +x axial direction) as the plurality of second directions.

FIGS. 3E to 3H are views illustrating examples of the referencedirections when the lateral direction of the electronic device ishorizontally positioned according to an example embodiment. In FIGS. 3Eto 3H, a time point t0 is a time point when the processor 150 begins totrack the movement of the electronic device 100, and a time point t1 isa time point when the processor 150 identifies that the movementdistance of the electronic device 100 is equal to or greater than thespecified reference distance, and the moving direction of the electronicdevice 100 matches the reference direction.

Referring to FIG. 3E, the processor 150 may identify that the electronicdevice 100 has been moved the specified reference distance in thedownwards direction (i.e., the arrow of FIG. 3E: corresponding to the +xaxial direction of FIG. 3E) of the electronic device 100 at the timepoint t1 among the upwards, downwards, leftwards and rightwardsdirections of the electronic device 100. In this case, the processor 150may determine the downwards direction as the reference direction, anddetermine the leftwards direction (e.g., the −y axial direction) and therightwards direction (e.g., the +y axial direction) as the plurality ofsecond directions.

As shown in FIG. 3F, the processor 150 may identify that the electronicdevice 100 has been moved the specified reference distance correspondsto the upper side direction (see the arrow of FIG. 3F: e.g., the −xdirection) of the electronic device 100 among the upper side, lowerside, left and right directions of the electronic device 100. In thiscase, the processor 150 may determine the upper side direction as thereference direction and determine the left direction (e.g., the −ydirection) and the right direction (e.g., the +y direction) of theelectronic device 100 at the time point t1 as the plurality of seconddirections.

As shown in FIG. 3G, the processor 150 may identify that the movingdirection of the electronic device 100 moved by the specified referencedistance in the rightwards direction (i.e., the arrow of FIG. 3Gcorresponding to the −y axial direction) of the electronic device 100from among the upwards, downwards, leftwards and rightwards directionsof the electronic device 100. In this case, the processor 150 maydetermine the rightwards direction of the electronic device at the timepoint t1 to be the reference direction and determine the upwardsdirection (i.e., the +x axial direction) and the rightwards direction(i.e., the −x axial direction) of the electronic device 100 as theplurality of second directions.

As shown in FIG. 3H, the processor 150 may identify that the movingdirection of the electronic device 100 moved by the specified referencedistance in the leftwards direction (i.e., the arrow of FIG. 3Hcorresponding to the +y axial direction) of the electronic device 100among the upwards, downwards, leftwards and rightwards directions of theelectronic device 100. In this case, the processor 150 may determine theleftwards direction of the electronic device at the time point t1 to bethe reference direction and determine the upwards direction (i.e., the+x axial direction) and the rightwards direction (i.e., the −x axialdirection) of the electronic device 100 as the plurality of seconddirections.

FIG. 4A is a view illustrating an angle change in the yz-axis directionof the electronic device according to an example embodiment. The timepoint t0 may be a time point at which the processor 150 begins trackingthe movement of the electronic device 100. The time point t1 may be atime point at which the processor 150 identifies that the movementdistance ‘d’ of the electronic device 100 is equal to or greater thanthe prespecified reference distance, and the moving direction of theelectronic device 100 corresponds to the prespecified referencedirection.

Referring to FIG. 4A, when it is identified that the movement distance‘d’ of the electronic device 100 is equal to or greater than theprespecified reference distance and the moving direction of theelectronic device 100 corresponds to (e.g., matches) the prespecifiedreference direction, the processor 150 (e.g., the processor 150 of FIG.2) may identify an angle change of the electronic device 100 in theyz-axis direction (e.g., a rotation pivoting on the x axis), whilemovement continues for the prespecified reference distance, based on themovement information. For example, the processor 150 may identify (e.g.,detect) an angle change “Oyz” in the yz-axis direction of the electronicdevice 100 the time period from the time point t0 to the time point t1based on the movement information. The processor 150 may determinewhether the angle change in the yz-axis direction is within a firstspecified reference range (e.g., a tolerance for angle changes, such asfrom +10 degrees to −10 degrees). For example, the angle change in theyz-axis direction may include an angle change in a direction from thefront surface of the electronic device 100 toward the rear surface ofthe electronic device 100, based on the lateral direction of theelectronic device 100, or an angle change in a direction from the rearsurface of the electronic device 100 toward the front surface of theelectronic device 100.

FIG. 4B is a view illustrating an angle change in the xy-axis directionof the electronic device according to an embodiment. The time point t0may be a time point at which the processor 150 begins to track themovement of the electronic device 100. The time point t1 may be a timepoint at which the processor 150 identifies that the movement distance‘d’ of the electronic device 100 is now equal to or greater than theprespecified reference distance, and the moving direction of theelectronic device 100 matches the prespecified reference direction.

Referring to FIG. 4B, when it is identified that the movement distance‘d’ of the electronic device 100 is equal to or greater than theprespecified reference distance, and the moving direction of theelectronic device 100 matches the reference direction, the processor 150(e.g., the processor 150 of FIG. 2) may identify (e.g., detect) an anglechange of the electronic device 100 in the xy-axis direction (i.e., arotation pivoting on the z axis), while movement continues to thespecified reference distance, based on the movement information. Forexample, the processor 150 may identify the angle change Oxy in thexy-axis direction of the electronic device 100 for the time periodspanning from the time point t0 to the time point t1, based on themovement information. The processor 150 may determine whether the anglechange in the xy-axis direction is within a second specified referencerange (e.g., a tolerance for angle changes, such as from +10 degrees to−10 degrees). For example, the angle change in the xy-axis direction mayinclude a clockwise angle change or a counterclockwise angle change ofthe front or rear surface of the electronic device 100.

FIG. 4C is a view illustrating an angle change in the zx-axis directionof the electronic device according to an embodiment. The time point t0may be a time point at which the processor 150 begins to track themovement of the electronic device 100. The time point t1 may be a timepoint at which the processor 150 identifies that the movement distance‘d’ of the electronic device 100 is now equal to or greater than thespecified reference distance and the moving direction of the electronicdevice 100 matches the prespecified reference direction.

Referring to FIG. 4C, when it is identified that the movement distance‘d’ of the electronic device 100 is equal to or greater than theprespecified reference distance and the moving direction of theelectronic device 100 matches the prespecified reference direction, theprocessor 150 (e.g., the processor 150 of FIG. 2) may identify (e.g.,detect) an angle change of the electronic device 100 in the zx-axisdirection (i.e., a rotation pivoting along the y axis), while movementcontinues to the prespecified reference distance, based on the movementinformation. For example, the processor 150 may identify (e.g., detect)an angle change Ozx in the zx-axis direction of the electronic device100, for the time period spanning from the time point t0 to the timepoint t1 based on the movement information. The processor 150 maydetermine whether the angle change in the zx-axis direction is within athird specified reference range (e.g., a tolerance for angle changes,such as from +10 degrees to −10 degrees). For example, the angle changein the zx-axis direction may include an angle change in the directionfrom the front surface of the electronic device 100 toward the rearsurface of the electronic device 100 based on the vertical direction ofthe electronic device 100, or an angle change in the direction from therear surface of the electronic device 100 toward the front surface ofthe electronic device 100.

In the above-described FIGS. 4A to 4C, when the angle change of theelectronic device 100 in the yz-axis direction is within the firstprespecified reference range, or when the angle change of the electronicdevice 100 in the xy-axis direction is within the second prespecifiedreference range, or when the angle change of the electronic device 100in the zx-axis direction is within the third prespecified referencerange, the processor 150 may automatically switch from the preview modeto the panorama capture mode.

FIG. 5A is a view illustrating an example of a UI screen that isdisplayed during a process of switching from a preview mode to apanorama capture mode, according to an example embodiment.

Referring to FIG. 5A, a screen 510 may be displayed, and a processor(e.g., the processor 150 of FIG. 2) may obtain an image using the camera110 and, while executing a preview mode, output the obtained image(i.e., a preview image) to a display (e.g., the display 130 of FIG. 2).The processor 150 may determine whether the movement of the electronicdevice 100 meets a prespecified condition based on the movementinformation of the electronic device 100 (e.g., monitoring the movementperiodically during a specified period of time) while outputting thepreview image to the display 130 in the preview mode. For example, thespecified condition may mandate that the movement distance of theelectronic device 100 is equal to or greater than the prespecifiedreference distance, the moving direction of the electronic device 100matches a prespecified reference direction, an angle change of theelectronic device 100 is within the specified reference range of anglechanges while the electronic device 100 is moved by the specifiedreference distance, and/or a specified object is included within thepreview image.

In a screen 520, when the movement of the electronic device 100 meetsthe specified condition, the processor 150 may output on the displayscreen information 521 providing visual guidance facilitating automaticswitching to the panorama capture mode. For example, when the electronicdevice 100 continues to move in the reference direction, the outputscreen information 521 may provide visual guidance to a user during theswitch to the panorama capture mode.

In a screen 530, as a user moves the electronic device 100 further byanother prespecified reference distance in the moving direction, then,when it is identified based on the movement information that theelectronic device 100 has moved by the another prespecified referencedistance (e.g., 5 cm) in the reference direction, the processor 150 mayswitch from the preview mode to the panorama capture mode. The processor150 may generate a panoramic image based on images obtained by using thecamera 110 in the preview mode.

FIG. 5B is a view illustrating an example of a UI screen in a case wherea switch to a panorama capture mode is refused, according to anembodiment.

Referring to FIG. 5B, when the movement of the electronic device 100meets the prespecified condition, the processor 150 (e.g., the processor150 of FIG. 2) may output, to the display 130, screen information 553providing visual guidance for automatically switching to the panoramacapture mode, and may include a termination button 551 selectable toprevent switching to the panorama mode, and maintaining the preview modeinstead. For example, the screen information 553 may be informationprovided to guide switching to the panorama capture mode when theelectronic device 100 is further moved in the reference direction.

When the termination button 551 is touched (or selected), the processor150 may maintain the preview mode. The processor 150 may continue tooutput a preview image obtained by using the camera 110 in the previewmode.

FIG. 6A is a view illustrating another example of a UI screen in aprocess of switching from a preview mode to a panorama capture modeaccording to an embodiment.

Referring to FIG. 6A, in a screen 610, the processor (e.g., theprocessor 150 of FIG. 2) 150 may obtain an image using the camera 110 inthe preview mode and may output the obtained image (i.e., a previewimage) to a display (e.g., the display 130 of FIG. 2). The processor 150may determine whether the movement of the electronic device 100 meets aprespecified condition, based on the movement information of theelectronic device 100 (e.g., as periodically detected through aspecified period of time) while outputting the preview image to thedisplay 130 in the preview mode. For example, the prespecified conditionmay mandate that the movement distance of the electronic device 100 beequal to or greater than the prespecified reference distance, the movingdirection of the electronic device 100 match the prespecified referencedirection, the angle change of the electronic device 100 be within thespecified reference range of angle changes while the electronic device100 moves the specified reference distance, and/or a specified object beincluded in the preview image.

In a screen 620, when the movement of the electronic device 100 meetsthe prespecified condition, the processor 150 may output, to the display130, a switching button 621 (e.g., an approval object) selectable toswitch to the panorama capture mode. When the processor 150 receives afirst user input (e.g., a touch input to the switching button 621),switching to the panorama capture mode is confirmed, and the processor150 may switch to the panorama capture mode. For example, the first userinput may include, for example, a touch input to the switching button621. The processor 150 may maintain the preview mode when a second userinput is received that rejects switching to the panorama capture mode.For example, the second user input may include a touch input to an areaof the display 130 other than the switching button 621. When the previewmode is maintained, the processor 150 may monitor whether the electronicdevice 100 is in a state requesting automatic switching to the panoramacapture mode, by tracking the movement of the electronic device 100periodically through a specified period of time.

In the screen 630, after switching to the panorama capture mode, theprocessor 150 may output screen information including a selection button631 selectable to set a “generation direction” or “progress direction”for the panoramic image, meaning a direction in which the camera will bepanned to generate the panoramic image. For example, the selectionbutton 631 may be related to a menu for selecting the progress direction(e.g., the left or right direction) of the electronic device 100 in thepanorama capture mode. The processor 150 may identify a third user input(e.g., a touch input selecting a progress direction) that selects aprogress direction of the electronic device 100 through the selectionbutton 631, and may generate a panoramic image by using the imagesobtained by using the camera 110 while the camera is panned in theselected progress direction.

FIG. 6B is a view illustrating another example of the UI screen when aswitch to a panorama capture mode is rejected, according to anembodiment.

Referring to FIG. 6B, when movement of the electronic device 100 meets aprespecified condition, the processor 150 (e.g., the processor 150 ofFIG. 2) may output, to the display 130, screen information 653 includinga switching button (e.g., an ‘approval’ object) 651 selectable to switchto the panorama capture mode, and a termination button 652 selectable tomaintain the preview mode without switching to the panorama mode.

When the termination button 652 is touched (or selected) by a user, theprocessor 150 may be maintained in the preview mode. The processor 150may output a preview image obtained using the camera 110 in the previewmode.

FIG. 7A is a view illustrating a UI screen in a panorama capture modeaccording to an embodiment.

Referring to FIG. 7A, the processor 150 (e.g., the processor 150 of FIG.2) may generate a panoramic image by attaching the first images obtainedin the preview mode in advance of the second images obtained in thepanorama capture mode. In this case, the panoramic image may include anarea 710 generated by using the first images and an area 720 generatedby using the second images.

When the processor 150 obtains the second images in the panorama capturemode, the processor 150 may output at least a portion of the generatedpanoramic image to the display 130 while generating the panoramic imagebased on the obtained second images. The processor 150 may output, tothe display 130, an editing object 730 for selecting one or more imagesto be used for generating the panoramic image from among the firstimages. For example, the editing object 730 may be displayed as a lineformed on a starting position of the panoramic image output to thedisplay 130. For example, when the panoramic image is an image in whicha plurality of images are connected to each other, aligned in a singlerow of images, the editing object 730 may be disposed over an imageforming a first column of the row of images forming the panoramic image.When the panoramic image is an image in which a plurality of images areconnected to each other as arranged as a column, the editing object 730may be disposed adjacent to an image forming a first row of the columnof images in the panoramic image. As another example, the editing object730 may be dragged and moved by a user. When the editing object 730 isdragged and moved by a user, the processor 150 may exclude, from thepanoramic image, the previous images in the area in which the movedediting object 730 is located, among the plurality of images forming thepanoramic image.

FIG. 7B is a view illustrating a UI screen in a process of selecting oneor more images to be included in a panoramic image according to anembodiment.

Referring to FIG. 7B, when the processor 150 (e.g., the processor 150 ofFIG. 2) switches to the panorama capture mode, as shown in a screen 750,the processor 150 may output a first preview panoramic image 755, whichis generated by couple each of the first images together, edge by edge,the first images obtained in the preview mode before the second imagesare obtained in the panorama capture mode. The processor 150 may furtheroutput a first editing object 751, which may be located on a first imagefrom among the first images. The processor 150 may further output asecond editing object 752, which may be located on an expected finalimage of the panoramic image. The first preview panoramic image 755 mayinclude a first display area 755A representing a generated panoramicimage and a second display area 755B representing a panoramic image tobe generated. The first display area 755A may include an arearepresenting the panoramic image generated from the first images and anarea representing the panoramic image from the second images.

When the first editing object 751 is dragged (e.g., dragged in a rightdirection), the processor 150 may output a second preview panoramicimage 765 corresponding to the dragged position as shown in the screen760. The second preview panoramic image 765 may be altered in that thefirst editing object 751 may be dragged to set a leftmost boundary ofthe second preview panoramic image 765. According, the second previewpanoramic image 765 may now include a third display area 765A,representing an image to be excluded from the panoramic image due to themovement of the first editing object 751, a fourth display area 765Brepresenting an image included in the panoramic image, and a fifthdisplay area 765C representing the panoramic image to be generated. Thethird display area 765A may be darkly processed (e.g., dim processing)and displayed. Thereafter, the panoramic image, which is generated whenthe panorama capture mode is terminated, may be a panoramic imagegenerated from the images from the start image corresponding to thefirst editing object 751 to the end image corresponding to the secondediting object 752. Notably, the second editing object 752 may bedragged as well (e.g., leftwards) in order to set a rightmost boundaryof the second preview panoramic image 765.

FIG. 7C is a view illustrating a UI screen when the panorama capturemode is terminated according to an embodiment.

Referring to FIG. 7C, as shown in a screen 770, the processor (e.g., theprocessor 150 of FIG. 2) may terminate the panorama capture mode basedon at least one of a user input or movement information of theelectronic device (e.g., the electronic device 100 of FIG. 2). Forexample, when the processor 150 identifies a user input requesting forthe termination of the panorama capture mode while photographing apanoramic image in the panorama capture mode, the processor 150 mayterminate the panorama capture mode. As another example, when thepanoramic image is completed in the panorama capture mode, the processor150 may terminate the panorama capture mode. As still another example,when the movement information of the electronic device 100 meets anotherspecified condition, the processor 150 may terminate the panoramicphotographing. For example, the another specified condition may includea condition in which the angle change of the electronic device is out ofthe angular range in which the panoramic image can be generated. Forexample, the another specified condition may include a condition inwhich the speed change of the electronic device 100 is out of themaximum speed at which the panoramic image can be generated. Accordingto certain embodiments, when the panorama capture mode is terminatedbefore the panoramic image is completed, the processor 150 may deletethe panoramic image stored in memory (e.g., the memory 140 of FIG. 2).

As shown in a screen 780, when the panorama capture mode is terminated,the processor 150 may switch to the preview mode.

FIG. 8 is a flowchart illustrating a photographing method according toan embodiment.

Referring to FIG. 8, in operation 810, the processor (e.g., theprocessor 150 of FIG. 2), may obtain the movement information of theelectronic device 100 by using the sensor circuit (e.g., referencenumeral 120 of FIG. 2) in the preview mode.

In operation 820, the processor 150 may track the movement distance ofthe electronic device based on the movement information based on themovement information.

In operation 830, when the movement distance of the electronic device100 is greater than or equal to the prespecified reference distance, theprocessor 150 may determine whether the moving direction of theelectronic device 100 matches the reference direction based on themovement information, while the electronic device 100 continues to moveunto the prespecified reference distance.

In operation 840, when the moving direction of the electronic device 100is the reference direction, the processor 150 may identify angle changeof the electronic device 100 based on the movement information.

In operation 850, when the angle change of the electronic device 100 iswithin a specified angle range, the processor 150 may switch from thepreview mode to the panorama capture mode.

According to certain embodiments, the processor 150 may first identifythe moving direction and the angle change of the electronic device 100based on the movement information of the electronic device 100, andthen, may switch from the preview mode to the panorama capture modebased on at least the movement distance of the electronic device 100. Inaddition, the processor 150 may determine whether the electronic device100 has been stopped for a specified time based on the movementinformation, and may start to track the movement distance of theelectronic device 100 when the electronic device 100 has been stoppedfor the specified time.

According to an embodiment, a photographing method by an electronicdevice (e.g., the electronic device 100 of FIG. 2) may include obtainingmovement information by using a sensor circuit (e.g., the display 130 ofFIG. 2) in a preview mode for outputting an image obtained by using acamera (e.g., the camera 110 of FIG. 2) to a display (e.g., the display130 of FIG. 2); tracking a movement distance of the electronic devicebased on the movement information; determining whether a movingdirection of the electronic device is a specified reference directionduring the movement by the specified reference distance based on themovement information based on the movement information when the movementdistance of the electronic device is equal to or greater than aspecified reference distance; and switching to a panorama capture modewhen the moving direction of the electronic device is the referencedirection.

The reference direction may include at least one of a left direction, aright direction, an upward direction, and a downward direction of theelectronic device moved by the specified reference distance.

The method may further include identifying an angle change of theelectronic device during the movement by the specified referencedistance based on the movement information, where the switching mayinclude switching to the panorama capture mode when the moving directionof the electronic device is the reference direction and the angle changeis within a specified reference range.

The identifying of the angle change may include identifying at least oneof an angle change in an xy axis direction, an angle change in an yzaxis direction, or an angle change in a zx axis direction amongspecified three-axis directions.

According to an embodiment, the photographing method may further includestoring, in the preview mode, first images obtained by using the camerawhile tracking the movement distance in a memory; storing, in thepanorama capture mode, second images obtained by using the camera in thememory; and generating a panoramic image based on the first and secondimages stored in the memory.

According to an embodiment, the photographing method may further includeoutputting screen information including a first menu capable ofspecifying some of the plurality of images to the display; andgenerating the panoramic image based on the images specified through thefirst menu.

According to an embodiment, the photographing method may further includeidentifying a moving speed of the electronic device while the electronicdevice is moved by the specified reference distance, based on themovement information, where the switching may include switching to thepanorama capture mode when the movement distance of the electronicdevice is greater than or equal to the specified reference distance, themoving direction of the electronic device is the reference direction,and the moving speed of the electronic device is less than a specifiedreference speed.

According to an embodiment, the photographing method may further includeidentifying a location change of the electronic device with respect to aplurality of second directions perpendicular to the reference directionduring the movement by the specified reference distance based on themovement information, where the switching may include switching to thepanorama capture mode when the movement distance of the electronicdevice is equal to or greater than a specified reference distance, themoving direction of the electronic device is the reference direction,and the location changes of the electronic device in the seconddirections are within a specified reference distance range.

FIG. 9 is a block diagram illustrating an electronic device 901 (e.g.,the electronic device 100 of FIG. 2) in a network environment 900according to certain embodiments. Referring to FIG. 9, the electronicdevice 901 in the network environment 900 may communicate with anelectronic device 902 via a first network 998 (e.g., a short-rangewireless communication network), or an electronic device 904 or a server908 via a second network 999 (e.g., a long-range wireless communicationnetwork). According to an embodiment, the electronic device 901 maycommunicate with the electronic device 904 via the server 908. Accordingto an embodiment, the electronic device 901 may include a processor 920(e.g., the processor 150 of FIG. 2), memory 930 (e.g., the memory 140 ofFIG. 2), an input device 950, a sound output device 955, a displaydevice 960 (e.g., the display 130 of FIG. 2), an audio module 970, asensor module 976 (e.g., the sensor circuit 120 of FIG. 2), an interface977, a haptic module 979, a camera module 980 (e.g., the camera 110 ofFIG. 2), a power management module 988, a battery 989, a communicationmodule 990, a subscriber identification module (SIM) 996, or an antennamodule 997. In some embodiments, at least one (e.g., the display device960 or the camera module 980) of the components may be omitted from theelectronic device 901, or one or more other components may be added inthe electronic device 901. In some embodiments, some of the componentsmay be implemented as single integrated circuitry. For example, thesensor module 976 (e.g., a fingerprint sensor, an iris sensor, or anilluminance sensor) may be implemented as embedded in the display device960 (e.g., a display).

The processor 920 may execute, for example, software (e.g., a program940) to control at least one other component (e.g., a hardware orsoftware component) of the electronic device 901 coupled with theprocessor 920, and may perform various data processing or computation.According to an embodiment, as at least part of the data processing orcomputation, the processor 920 may load a command or data received fromanother component (e.g., the sensor module 976 or the communicationmodule 990) in volatile memory 932, process the command or the datastored in the volatile memory 932, and store resulting data innon-volatile memory 934. According to an embodiment, the processor 920may include a main processor 921 (e.g., a central processing unit (CPU)or an application processor (AP)), and an auxiliary processor 923 (e.g.,a graphics processing unit (GPU), an image signal processor (ISP), asensor hub processor, or a communication processor (CP)) that isoperable independently from, or in conjunction with, the main processor921. Additionally or alternatively, the auxiliary processor 923 may beadapted to consume less power than the main processor 921, or to bespecific to a specified function. The auxiliary processor 923 may beimplemented as separate from, or as part of the main processor 921.

The auxiliary processor 923 may control at least some of functions orstates related to at least one component (e.g., the display device 960,the sensor module 976, or the communication module 990) among thecomponents of the electronic device 901, instead of the main processor921 while the main processor 921 is in an inactive (e.g., sleep) state,or together with the main processor 921 while the main processor 921 isin an active state (e.g., executing an application). According to anembodiment, the auxiliary processor 923 (e.g., an image signal processoror a communication processor) may be implemented as part of anothercomponent (e.g., the camera module 980 or the communication module 990)functionally related to the auxiliary processor 923.

The memory 930 may store various data used by at least one component(e.g., the processor 920 or the sensor module 976) of the electronicdevice 901. The various data may include, for example, software (e.g.,the program 940) and input data or output data for a command relatedthererto. The memory 930 may include the volatile memory 932 or thenon-volatile memory 934.

The program 940 may be stored in the memory 930 as software, and mayinclude, for example, an operating system (OS) 942, middleware 944, oran application 946.

The input device 950 may receive a command or data to be used by othercomponent (e.g., the processor 920) of the electronic device 901, fromthe outside (e.g., a user) of the electronic device 901. The inputdevice 950 may include, for example, a microphone, a mouse, or akeyboard.

The sound output device 955 may output sound signals to the outside ofthe electronic device 901. The sound output device 955 may include, forexample, a speaker or a receiver. The speaker may be used for generalpurposes, such as playing multimedia or playing record, and the receivermay be used for an incoming calls. According to an embodiment, thereceiver may be implemented as separate from, or as part of the speaker.

The display device 960 may visually provide information to the outside(e.g., a user) of the electronic device 901. The display device 960 mayinclude, for example, a display, a hologram device, or a projector andcontrol circuitry to control a corresponding one of the display,hologram device, and projector. According to an embodiment, the displaydevice 960 may include touch circuitry adapted to detect a touch, orsensor circuitry (e.g., a pressure sensor) adapted to measure theintensity of force incurred by the touch.

The audio module 970 may convert a sound into an electrical signal andvice versa. According to an embodiment, the audio module 970 may obtainthe sound via the input device 950, or output the sound via the soundoutput device 955 or a headphone of an external electronic device (e.g.,an electronic device 902) directly (e.g., wiredly) or wirelessly coupledwith the electronic device 901.

The sensor module 976 may detect an operational state (e.g., power ortemperature) of the electronic device 901 or an environmental state(e.g., a state of a user) external to the electronic device 901, andthen generate an electrical signal or data value corresponding to thedetected state. According to an embodiment, the sensor module 976 mayinclude, for example, a gesture sensor, a gyro sensor, an atmosphericpressure sensor, a magnetic sensor, an acceleration sensor, a gripsensor, a proximity sensor, a color sensor, an infrared (IR) sensor, abiometric sensor, a temperature sensor, a humidity sensor, or anilluminance sensor.

The interface 977 may support one or more specified protocols to be usedfor the electronic device 901 to be coupled with the external electronicdevice (e.g., the electronic device 902) directly (e.g., wiredly) orwirelessly. According to an embodiment, the interface 977 may include,for example, a high definition multimedia interface (HDMI), a universalserial bus (USB) interface, a secure digital (SD) card interface, or anaudio interface.

A connecting terminal 978 may include a connector via which theelectronic device 901 may be physically connected with the externalelectronic device (e.g., the electronic device 902). According to anembodiment, the connecting terminal 978 may include, for example, a HDMIconnector, a USB connector, a SD card connector, or an audio connector(e.g., a headphone connector),

The haptic module 979 may convert an electrical signal into a mechanicalstimulus (e.g., a vibration or a movement) or electrical stimulus whichmay be recognized by a user via his tactile sensation or kinestheticsensation. According to an embodiment, the haptic module 979 mayinclude, for example, a motor, a piezoelectric element, or an electricstimulator.

The camera module 980 may capture a still image or moving images.According to an embodiment, the camera module 980 may include one ormore lenses, image sensors, image signal processors, or flashes.

The power management module 988 may manage power supplied to theelectronic device 901. According to an embodiment, the power managementmodule 988 may be implemented as at least part of, for example, a powermanagement integrated circuit (PMIC).

The battery 989 may supply power to at least one component of theelectronic device 901. According to an embodiment, the battery 989 mayinclude, for example, a primary cell which is not rechargeable, asecondary cell which is rechargeable, or a fuel cell.

The communication module 990 may support establishing a direct (e.g.,wired) communication channel or a wireless communication channel betweenthe electronic device 901 and the external electronic device (e.g., theelectronic device 902, the electronic device 904, or the server 908) andperforming communication via the established communication channel. Thecommunication module 990 may include one or more communicationprocessors that are operable independently from the processor 920 (e.g.,the application processor (AP)) and supports a direct (e.g., wired)communication or a wireless communication. According to an embodiment,the communication module 990 may include a wireless communication module992 (e.g., a cellular communication module, a short-range wirelesscommunication module, or a global navigation satellite system (GNSS)communication module) or a wired communication module 994 (e.g., a localarea network (LAN) communication module or a power line communication(PLC) module). A corresponding one of these communication modules maycommunicate with the external electronic device via the first network998 (e.g., a short-range communication network, such as Bluetooth™,wireless-fidelity (Wi-Fi) direct, or infrared data association (IrDA))or the second network 999 (e.g., a long-range communication network,such as a cellular network, the Internet, or a computer network (e.g.,LAN or wide area network (WAN)). These various types of communicationmodules may be implemented as a single component (e.g., a single chip),or may be implemented as multi components (e.g., multi chips) separatefrom each other. The wireless communication module 992 may identify andauthenticate the electronic device 901 in a communication network, suchas the first network 998 or the second network 999, using subscriberinformation (e.g., international mobile subscriber identity (IMSI))stored in the subscriber identification module 996.

The antenna module 997 may transmit or receive a signal or power to orfrom the outside (e.g., the external electronic device) of theelectronic device 901. According to an embodiment, the antenna module997 may include one or more antennas, and, therefrom, at least oneantenna appropriate for a communication scheme used in the communicationnetwork, such as the first network 998 or the second network 999, may beselected, for example, by the communication module 990 (e.g., thewireless communication module 992). The signal or the power may then betransmitted or received between the communication module 990 and theexternal electronic device via the selected at least one antenna.

At least some of the above-described components may be coupled mutuallyand communicate signals (e.g., commands or data) therebetween via aninter-peripheral communication scheme (e.g., a bus, general purposeinput and output (GPIO), serial peripheral interface (SPI), or mobileindustry processor interface (MIPI)).

According to an embodiment, commands or data may be transmitted orreceived between the electronic device 901 and the external electronicdevice 904 via the server 908 coupled with the second network 999. Eachof the electronic devices 902 and 904 may be a device of a same type as,or a different type, from the electronic device 901. According to anembodiment, all or some of operations to be executed at the electronicdevice 901 may be executed at one or more of the external electronicdevices 902, 904, or 908. For example, if the electronic device 901should perform a function or a service automatically, or in response toa request from a user or another device, the electronic device 901,instead of, or in addition to, executing the function or the service,may request the one or more external electronic devices to perform atleast part of the function or the service. The one or more externalelectronic devices receiving the request may perform the at least partof the function or the service requested, or an additional function oran additional service related to the request, and transfer an outcome ofthe performing to the electronic device 901. The electronic device 901may provide the outcome, with or without further processing of theoutcome, as at least part of a reply to the request. To that end, acloud computing, distributed computing, or client-server computingtechnology may be used, for example.

As used herein, the term “module” may include a unit implemented inhardware, software, or firmware, and may interchangeably be used withother terms, for example, “logic,” “logic block,” “part,” or“circuitry”. A module may be a single integral component, or a minimumunit or part thereof, adapted to perform one or more functions. Forexample, according to an embodiment, the module may be implemented in aform of an application-specific integrated circuit (ASIC).

Certain embodiments as set forth herein may be implemented as software(e.g., the program 940) including one or more instructions that arestored in a storage medium (e.g., internal memory 936 or external memory938) that is readable by a machine (e.g., the electronic device 901).For example, a processor (e.g., the processor 920) of the machine (e.g.,the electronic device 901) may invoke at least one of the one or moreinstructions stored in the storage medium, and execute it, with orwithout using one or more other components under the control of theprocessor. This allows the machine to be operated to perform at leastone function according to the at least one instruction invoked. The oneor more instructions may include a code generated by a complier or acode executable by an interpreter. The machine-readable storage mediummay be provided in the form of a non-transitory storage medium. Wherein,the term “non-transitory” simply means that the storage medium is atangible device, and does not include a signal (e.g., an electromagneticwave), but this term does not differentiate between where data issemi-permanently stored in the storage medium and where the data istemporarily stored in the storage medium.

According to an embodiment, a method according to certain embodiments ofthe disclosure may be included and provided in a computer programproduct. The computer program product may be traded as a product betweena seller and a buyer. The computer program product may be distributed inthe form of a machine-readable storage medium (e.g., compact disc readonly memory (CD-ROM)), or be distributed (e.g., downloaded or uploaded)online via an application store (e.g., Play Store™), or between two userdevices (e.g., smart phones) directly. If distributed online, at leastpart of the computer program product may be temporarily generated or atleast temporarily stored in the machine-readable storage medium, such asmemory of the manufacturer's server, a server of the application store,or a relay server.

According to certain embodiments, each component (e.g., a module or aprogram) of the above-described components may include a single entityor multiple entities. According to certain embodiments, one or more ofthe above-described components may be omitted, or one or more othercomponents may be added. Alternatively or additionally, a plurality ofcomponents (e.g., modules or programs) may be integrated into a singlecomponent. In such a case, according to certain embodiments, theintegrated component may still perform one or more functions of each ofthe plurality of components in the same or similar manner as they areperformed by a corresponding one of the plurality of components beforethe integration. According to certain embodiments, operations performedby the module, the program, or another component may be carried outsequentially, in parallel, repeatedly, or heuristically, or one or moreof the operations may be executed in a different order or omitted, orone or more other operations may be added.

The electronic device according to the embodiments disclosed in thedisclosure may automatically switch from the preview mode to thepanorama capture mode based on the movement of the electronic device,thereby allowing a user to conveniently use the panorama capture mode.In addition, various effects that are directly or indirectly understoodthrough the disclosure may be provided.

While the disclosure has been shown and described with reference tocertain embodiments thereof, it will be understood by those skilled inthe art that various changes in form and details may be made thereinwithout departing from the disclosure as defined by the appended claimsand their equivalents.

What is claimed is:
 1. An electronic device comprising: a display; a camera arranged on one surface of the electronic device; a sensor circuit configured to sense movement of the electronic device; a processor functionally coupled to the camera and the sensor circuit; and a memory electrically coupled to the processor, wherein the memory stores instructions that, when executed, cause the processor to: execute a preview mode including outputting an image obtained using the camera to the display, obtain movement information using the sensor circuit while executing the preview mode and identify a velocity of the movement of the electronic device based on the movement information; determine whether a movement distance of the electronic device is equal to or greater than a prespecified reference distance, based on the movement information while executing the preview mode; when the movement distance is equal to or greater than the prespecified reference distance, determine whether a moving direction of the electronic device matches a prespecified reference direction based on the movement information while executing the preview mode; in the preview mode, store first images in the memory, the first images obtained using the camera while tracking the movement distance; when the moving direction of the electronic device matches the prespecified reference direction and when the velocity of the electronic device is less than a prespecified velocity, switch from the preview mode to a panorama capture mode, and in the panorama capture mode, store second images obtained using the camera in the memory; and generate a panoramic image based on the first images and the second images stored in the memory.
 2. The electronic device of claim 1, wherein the reference direction includes at least one of a leftwards direction, a rightwards direction, an upwards direction, and a downwards direction of the electronic device.
 3. The electronic device of claim 1, wherein the instructions further cause the processor to: detect a change in an angle of the electronic device during the movement based on the movement information; and switch from the preview mode to the panorama capture mode when the moving direction of the electronic device matches the prespecified reference direction, and the change in the angle is disposed within a prespecified reference range of angle changes.
 4. The electronic device of claim 3, wherein an x axis represents a horizontal plane of the electronic device, a y axis represents a vertical plane of the electronic device, and a z axis represents a depthward plane of the electronic device, and wherein the change in the angle corresponds to one of a change in the x and y axes, a change in the y and z axes, and a change in the z and x axes.
 5. The electronic device of claim 1, wherein the instructions further cause the processor to: after switching to the panorama capture mode, while the electronic device continues moving, detect from the movement information that the velocity exceeds the prespecified velocity; and in response detecting that the velocity exceeds the prespecified velocity, terminate the panorama capture mode.
 6. The electronic device of claim 1, wherein the instructions further cause the processor to: switch to the panorama capture mode when the movement distance of the electronic device is equal to or greater than the prespecified reference distance, the moving direction of the electronic device matches the prespecified reference direction, and a location of the electronic device is within a predetermined range of a direction perpendicular to the reference direction.
 7. The electronic device of claim 1, wherein the instructions further cause the processor to: delete the first images from the memory when the movement distance is less than the prespecified reference distance, or the direction of the movement is different from the prespecified reference direction.
 8. The electronic device of claim 1, wherein the instructions further cause the processor to: output screen information including a first menu from which one or more images from among a plurality of images are specifiable; and generate the panoramic image based on the one or more images specified through the first menu.
 9. The electronic device of claim 1, wherein the instructions further cause the processor to: identify an object included in a plurality of images, wherein, in addition to the moving direction, switching to the panorama capture mode is further based on whether the movement distance of the electronic device is equal to or greater than the prespecified reference distance, and whether the identified object matches a prespecified object.
 10. The electronic device of claim 1, wherein the instructions further cause the processor to: display a guide object selectable to switch to the panorama capture mode when the movement distance of the electronic device is equal to or greater than the prespecified reference distance, and the moving direction of the electronic device is the prespecified reference direction; and switch to the panorama capture mode when the electronic device moves a second prespecified reference distance in the reference direction.
 11. The electronic device of claim 1, wherein the instructions further cause the processor to: output, to the display, screen information including a second menu selectable to switch to the panorama capture mode when the movement distance of the electronic device is equal to or greater than the prespecified reference distance, and the moving direction of the electronic device is the prespecified reference direction; and switch to the panorama capture mode in response to detecting a user input to the second menu requesting a switch to the panorama capture mode.
 12. A method of an electronic device, comprising: when detecting a movement of the electronic device, obtaining movement information using a sensor circuit while executing a preview mode, the preview mode including outputting an image obtained using a camera to a display, tracking a movement distance of the electronic device based on the movement information while executing the preview mode and identifying a velocity of the movement of the electronic device based on the movement information; when the movement distance of the electronic device is equal to or greater than a prespecified reference distance, determining whether a moving direction of the electronic device matches a prespecified reference direction during the movement based on the movement information while executing the preview mode; in the preview mode, storing first images in a memory, the first images obtained using the camera while tracking the movement distance; when the moving direction of the electronic device matches the prespecified reference direction and when the velocity of the electronic device is less than a prespecified velocity, switching from the preview mode to a panorama capture mode, in the panorama capture mode, storing second images obtained using the camera in the memory; and generating a panoramic image based on the first images and the second images stored in the memory.
 13. The method of claim 12, wherein the reference direction includes at least one of a leftwards direction, a rightwards direction, an upwards direction, and a downwards direction of the electronic device.
 14. The method of claim 12, further comprising: after switching to the panorama capture mode, while the electronic device continues moving, detecting from the movement information that the velocity exceeds the prespecified velocity; and in response detecting that the velocity exceeds the prespecified velocity, terminating the panorama capture mode.
 15. The method of claim 14, wherein an x axis represents a horizontal plane of the electronic device, a y axis represents a vertical plane of the electronic device, and a z axis represents a depthward plane of the electronic device, and wherein the change in the angle corresponds to one of a change in the x and y axes, a change in the y and z axes, and a change in the z and x axes.
 16. The method of claim 12, further comprising: outputting screen information including a first menu from which one or more images from among a plurality of images are specifiable; and generating the panoramic image based on the one or more images specified through the first menu.
 17. The method of claim 12, further comprising: identifying a velocity of the movement of the electronic device based on the movement information, switching to the panorama capture mode when the movement distance of the electronic device is greater than or equal to the prespecified reference distance, the moving direction of the electronic device matches the prespecified reference direction, and the velocity of the electronic device is less than a prespecified velocity.
 18. The method of claim 12, further comprising: switching to the panorama capture mode when the movement distance of the electronic device is equal to or greater than the prespecified reference distance, the moving direction of the electronic device matches the prespecified reference direction, and a location of the electronic device is within a predetermined range of a direction perpendicular to the reference direction. 